home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_gimp / INCLUDE / LIBGIMP / GIMP.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  25KB  |  701 lines

  1. /* LIBGIMP - The GIMP Library                                                   
  2.  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball                
  3.  *
  4.  * This library is free software; you can redistribute it and/or
  5.  * modify it under the terms of the GNU Library General Public
  6.  * License as published by the Free Software Foundation; either
  7.  * version 2 of the License, or (at your option) any later version.             
  8.  *                                                                              
  9.  * This library is distributed in the hope that it will be useful,              
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of               
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU            
  12.  * Library General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU Library General Public
  15.  * License along with this library; if not, write to the
  16.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17.  * Boston, MA 02111-1307, USA.
  18.  */                                                                             
  19. #ifndef __GIMP_H__
  20. #define __GIMP_H__
  21.  
  22.  
  23. #include <glib.h>
  24. #include <libgimp/gimpfeatures.h>
  25. #include <libgimp/gimpenums.h>
  26.  
  27.  
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif /* __cplusplus */
  31.  
  32.  
  33. extern const guint gimp_major_version;
  34. extern const guint gimp_minor_version;
  35. extern const guint gimp_micro_version;
  36.  
  37.  
  38. typedef struct _GPlugInInfo  GPlugInInfo;
  39. typedef struct _GTile        GTile;
  40. typedef struct _GDrawable    GDrawable;
  41. typedef struct _GPixelRgn    GPixelRgn;
  42. typedef struct _GParamDef    GParamDef;
  43. typedef struct _GParamColor  GParamColor;
  44. typedef struct _GParamRegion GParamRegion;
  45. typedef union  _GParamData   GParamData;
  46. typedef struct _GParam       GParam;
  47. typedef void   (* GRunProc) (char    *name,
  48.                  int      nparams,
  49.                  GParam  *param,
  50.                  int     *nreturn_vals,
  51.                  GParam **return_vals);
  52.  
  53.  
  54. struct _GPlugInInfo
  55. {
  56.   /* called when the gimp application initially starts up */
  57.   void (*init_proc) (void);
  58.  
  59.   /* called when the gimp application exits */
  60.   void (*quit_proc) (void);
  61.  
  62.   /* called by the gimp so that the plug-in can inform the
  63.    *  gimp of what it does. (ie. installing a procedure database
  64.    *  procedure).
  65.    */
  66.   void (*query_proc) (void);
  67.  
  68.   /* called to run a procedure the plug-in installed in the
  69.    *  procedure database.
  70.    */
  71.   void (*run_proc) (char    *name,
  72.             int      nparams,
  73.             GParam  *param,
  74.             int     *nreturn_vals,
  75.             GParam **return_vals);
  76. };
  77.  
  78. struct _GTile
  79. {
  80.   guint ewidth;        /* the effective width of the tile */
  81.   guint eheight;       /* the effective height of the tile */
  82.   guint bpp;           /* the bytes per pixel (1, 2, 3 or 4 ) */
  83.   guint tile_num;      /* the number of this tile within the drawable */
  84.   guint16 ref_count;   /* reference count for the tile */
  85.   guint dirty : 1;     /* is the tile dirty? has it been modified? */
  86.   guint shadow: 1;     /* is this a shadow tile */
  87.   guchar *data;        /* the pixel data for the tile */
  88.   GDrawable *drawable; /* the drawable this tile came from */
  89. };
  90.  
  91. struct _GDrawable
  92. {
  93.   gint32 id;            /* drawable ID */
  94.   guint width;          /* width of drawble */
  95.   guint height;         /* height of drawble */
  96.   guint bpp;            /* bytes per pixel of drawable */
  97.   guint ntile_rows;     /* # of tile rows */
  98.   guint ntile_cols;     /* # of tile columns */
  99.   GTile *tiles;         /* the normal tiles */
  100.   GTile *shadow_tiles;  /* the shadow tiles */
  101. };
  102.  
  103. struct _GPixelRgn
  104. {
  105.   guchar *data;         /* pointer to region data */
  106.   GDrawable *drawable;  /* pointer to drawable */
  107.   guint bpp;            /* bytes per pixel */
  108.   guint rowstride;      /* bytes per pixel row */
  109.   guint x, y;           /* origin */
  110.   guint w, h;           /* width and height of region */
  111.   guint dirty : 1;      /* will this region be dirtied? */
  112.   guint shadow : 1;     /* will this region use the shadow or normal tiles */
  113.   guint process_count;  /* used internally */
  114. };
  115.  
  116. struct _GParamDef
  117. {
  118.   GParamType type;
  119.   char *name;
  120.   char *description;
  121. };
  122.  
  123. struct _GParamColor
  124. {
  125.   guint8 red;
  126.   guint8 green;
  127.   guint8 blue;
  128. };
  129.  
  130. struct _GParamRegion
  131. {
  132.   gint32 x;
  133.   gint32 y;
  134.   gint32 width;
  135.   gint32 height;
  136. };
  137.  
  138. union _GParamData
  139. {
  140.   gint32 d_int32;
  141.   gint16 d_int16;
  142.   gint8 d_int8;
  143.   gdouble d_float;
  144.   gchar *d_string;
  145.   gint32 *d_int32array;
  146.   gint16 *d_int16array;
  147.   gint8 *d_int8array;
  148.   gdouble *d_floatarray;
  149.   gchar **d_stringarray;
  150.   GParamColor d_color;
  151.   GParamRegion d_region;
  152.   gint32 d_display;
  153.   gint32 d_image;
  154.   gint32 d_layer;
  155.   gint32 d_channel;
  156.   gint32 d_drawable;
  157.   gint32 d_selection;
  158.   gint32 d_boundary;
  159.   gint32 d_path;
  160.   gint32 d_status;
  161. };
  162.  
  163. struct _GParam
  164. {
  165.   GParamType type;
  166.   GParamData data;
  167. };
  168.  
  169.  
  170. #define MAIN() int main (int argc, char *argv[]) { return gimp_main (argc, argv); }
  171.  
  172.  
  173. /* The main procedure that should be called with the
  174.  *  'argc' and 'argv' that are passed to "main".
  175.  */
  176. int gimp_main (int   argc,
  177.            char *argv[]);
  178.  
  179. /* Forcefully causes the gimp library to exit and
  180.  *  close down its connection to main gimp application.
  181.  */
  182. void G_GNUC_NORETURN gimp_quit (void);
  183.  
  184. /* Specify a range of data to be associated with 'id'.
  185.  *  The data will exist for as long as the main gimp
  186.  *  application is running.
  187.  */
  188. void gimp_set_data (gchar *  id,
  189.             gpointer data,
  190.             guint32  length);
  191.  
  192. /* Retrieve the piece of data stored within the main
  193.  *  gimp application specified by 'id'. The data is
  194.  *  stored in the supplied buffer.  Make sure enough
  195.  *  space is allocated.
  196.  */
  197. void gimp_get_data (gchar *  id,
  198.             gpointer data);
  199.  
  200.  
  201. /* Initialize the progress bar with "message". If "message"
  202.  *  is NULL, the message displayed in the progress window will
  203.  *  be the name of the plug-in.
  204.  */
  205. void gimp_progress_init (char *message);
  206.  
  207. /* Update the progress bar. If the progress bar has not been
  208.  *  initialized then it will be automatically initialized as if
  209.  *  "gimp_progress_init (NULL)" were called. "percentage" is a
  210.  *  value between 0 and 1.
  211.  */
  212. void gimp_progress_update (gdouble percentage);
  213.  
  214.  
  215. /* Pops up a dialog box with "message". Useful for status and
  216.  * error reports. If "message" is NULL, do nothing.
  217.  */
  218. void gimp_message (char *message);
  219.  
  220.  
  221. /* Query the gimp application's procedural database.
  222.  *  The arguments are regular expressions which select
  223.  *  which procedure names will be returned in 'proc_names'.
  224.  */
  225. void gimp_query_database (char   *name_regexp,
  226.               char   *blurb_regexp,
  227.               char   *help_regexp,
  228.               char   *author_regexp,
  229.               char   *copyright_regexp,
  230.               char   *date_regexp,
  231.               char   *proc_type_regexp,
  232.               int    *nprocs,
  233.               char ***proc_names);
  234.  
  235. /* Query the gimp application's procedural database
  236.  *  regarding a particular procedure.
  237.  */
  238. gint gimp_query_procedure  (char       *proc_name,
  239.                 char      **proc_blurb,
  240.                 char      **proc_help,
  241.                 char      **proc_author,
  242.                 char      **proc_copyright,
  243.                 char      **proc_date,
  244.                 int        *proc_type,
  245.                 int        *nparams,
  246.                 int        *nreturn_vals,
  247.                 GParamDef  **params,
  248.                 GParamDef  **return_vals);
  249.  
  250. /* Query the gimp application regarding all open images.
  251.  *  The list of open image id's is returned in 'image_ids'.
  252.  */
  253. gint32* gimp_query_images (int *nimages);
  254.  
  255.  
  256. /* Install a procedure in the procedure database.
  257.  */
  258. void gimp_install_procedure (char      *name,
  259.                  char      *blurb,
  260.                  char      *help,
  261.                  char      *author,
  262.                  char      *copyright,
  263.                  char      *date,
  264.                  char      *menu_path,
  265.                  char      *image_types,
  266.                  int        type,
  267.                  int        nparams,
  268.                  int        nreturn_vals,
  269.                  GParamDef *params,
  270.                  GParamDef *return_vals);
  271.  
  272. /* Install a temporary procedure in the procedure database.
  273.  */
  274. void gimp_install_temp_proc (char      *name,
  275.                  char      *blurb,
  276.                  char      *help,
  277.                  char      *author,
  278.                  char      *copyright,
  279.                  char      *date,
  280.                  char      *menu_path,
  281.                  char      *image_types,
  282.                  int        type,
  283.                  int        nparams,
  284.                  int        nreturn_vals,
  285.                  GParamDef *params,
  286.                  GParamDef *return_vals,
  287.                  GRunProc   run_proc);
  288.  
  289. /* Uninstall a temporary procedure
  290.  */
  291. void gimp_uninstall_temp_proc (char *name);
  292.  
  293. /* Install a load file format handler in the procedure database.
  294.  */
  295. void gimp_register_magic_load_handler (char *name,
  296.                        char *extensions,
  297.                        char *prefixes,
  298.                        char *magics);
  299.  
  300. /* Install a load file format handler in the procedure database.
  301.  */
  302. void gimp_register_load_handler (char *name,
  303.                  char *extensions,
  304.                  char *prefixes);
  305.  
  306. /* Install a save file format handler in the procedure database.
  307.  */
  308. void gimp_register_save_handler (char *name,
  309.                  char *extensions,
  310.                  char *prefixes);
  311.  
  312. /* Run a procedure in the procedure database. The parameters are
  313.  *  specified via the variable length argument list. The return
  314.  *  values are returned in the 'GParam*' array.
  315.  */
  316. GParam* gimp_run_procedure (char *name,
  317.                 int  *nreturn_vals,
  318.                 ...);
  319.  
  320. /* Run a procedure in the procedure database. The parameters are
  321.  *  specified as an array of GParam.  The return
  322.  *  values are returned in the 'GParam*' array.
  323.  */
  324. GParam* gimp_run_procedure2 (char   *name,
  325.                  int    *nreturn_vals,
  326.                  int     nparams,
  327.                  GParam *params);
  328.  
  329. /* Destroy the an array of parameters. This is useful for
  330.  *  destroying the return values returned by a call to
  331.  *  'gimp_run_procedure'.
  332.  */
  333. void gimp_destroy_params (GParam *params,
  334.               int     nparams);
  335.  
  336. gdouble  gimp_gamma        (void);
  337. gint     gimp_install_cmap (void);
  338. gint     gimp_use_xshm     (void);
  339. guchar*  gimp_color_cube   (void);
  340. gchar*   gimp_gtkrc        (void);
  341.  
  342.  
  343. /****************************************
  344.  *              Images                  *
  345.  ****************************************/
  346.  
  347. gint32     gimp_image_new                   (guint      width,
  348.                          guint      height,
  349.                          GImageType type);
  350. void       gimp_image_delete                (gint32     image_ID);
  351. guint      gimp_image_width                 (gint32     image_ID);
  352. guint      gimp_image_height                (gint32     image_ID);
  353. GImageType gimp_image_base_type             (gint32     image_ID);
  354. gint32     gimp_image_floating_selection    (gint32     image_ID);
  355. void       gimp_image_add_channel           (gint32     image_ID,
  356.                          gint32     channel_ID,
  357.                          gint       position);
  358. void       gimp_image_add_layer             (gint32     image_ID,
  359.                          gint32     layer_ID,
  360.                          gint       position);
  361. void       gimp_image_add_layer_mask        (gint32     image_ID,
  362.                          gint32     layer_ID,
  363.                          gint32     mask_ID);
  364. void       gimp_image_clean_all             (gint32     image_ID);
  365. void       gimp_image_disable_undo          (gint32     image_ID);
  366. void       gimp_image_enable_undo           (gint32     image_ID);
  367. void       gimp_image_clean_all             (gint32     image_ID);
  368. gint32     gimp_image_flatten               (gint32     image_ID);
  369. void       gimp_image_lower_channel         (gint32     image_ID,
  370.                          gint32     channel_ID);
  371. void       gimp_image_lower_layer           (gint32     image_ID,
  372.                          gint32     layer_ID);
  373. gint32     gimp_image_merge_visible_layers  (gint32     image_ID,
  374.                          gint       merge_type);
  375. gint32     gimp_image_pick_correlate_layer  (gint32     image_ID,
  376.                          gint       x,
  377.                          gint       y);
  378. void       gimp_image_raise_channel         (gint32     image_ID,
  379.                          gint32     channel_ID);
  380. void       gimp_image_raise_layer           (gint32     image_ID,
  381.                          gint32     layer_ID);
  382. void       gimp_image_remove_channel        (gint32     image_ID,
  383.                          gint32     channel_ID);
  384. void       gimp_image_remove_layer          (gint32     image_ID,
  385.                          gint32     layer_ID);
  386. void       gimp_image_remove_layer_mask     (gint32     image_ID,
  387.                          gint32     layer_ID,
  388.                          gint       mode);
  389. void       gimp_image_resize                (gint32     image_ID,
  390.                          guint      new_width,
  391.                          guint      new_height,
  392.                          gint       offset_x,
  393.                          gint       offset_y);
  394. gint32     gimp_image_get_active_channel    (gint32     image_ID);
  395. gint32     gimp_image_get_active_layer      (gint32     image_ID);
  396. gint32*    gimp_image_get_channels          (gint32     image_ID,
  397.                          gint      *nchannels);
  398. guchar*    gimp_image_get_cmap              (gint32     image_ID,
  399.                          gint      *ncolors);
  400. gint       gimp_image_get_component_active  (gint32     image_ID,
  401.                          gint       component);
  402. gint       gimp_image_get_component_visible (gint32     image_ID,
  403.                          gint       component);
  404. char*      gimp_image_get_filename          (gint32     image_ID);
  405. gint32*    gimp_image_get_layers            (gint32     image_ID,
  406.                          gint      *nlayers);
  407. gint32     gimp_image_get_selection         (gint32     image_ID);
  408. void       gimp_image_set_active_channel    (gint32     image_ID,
  409.                          gint32     channel_ID);
  410. void       gimp_image_set_active_layer      (gint32     image_ID,
  411.                          gint32     layer_ID);
  412. void       gimp_image_set_cmap              (gint32     image_ID,
  413.                          guchar    *cmap,
  414.                          gint       ncolors);
  415. void       gimp_image_set_component_active  (gint32     image_ID,
  416.                          gint       component,
  417.                          gint       active);
  418. void       gimp_image_set_component_visible (gint32     image_ID,
  419.                          gint       component,
  420.                          gint       visible);
  421. void       gimp_image_set_filename          (gint32     image_ID,
  422.                          char      *name);
  423.  
  424.  
  425. /****************************************
  426.  *             Displays                 *
  427.  ****************************************/
  428.  
  429. gint32 gimp_display_new    (gint32 image_ID);
  430. void   gimp_display_delete (gint32 display_ID);
  431. void   gimp_displays_flush (void);
  432.  
  433.  
  434. /****************************************
  435.  *              Layers                  *
  436.  ****************************************/
  437.  
  438. gint32        gimp_layer_new                       (gint32        image_ID,
  439.                             char         *name,
  440.                             guint         width,
  441.                             guint         height,
  442.                             GDrawableType  type,
  443.                             gdouble       opacity,
  444.                             GLayerMode    mode);
  445. gint32        gimp_layer_copy                      (gint32        layer_ID);
  446. void          gimp_layer_delete                    (gint32        layer_ID);
  447. guint         gimp_layer_width                     (gint32        layer_ID);
  448. guint         gimp_layer_height                    (gint32        layer_ID);
  449. guint         gimp_layer_bpp                       (gint32        layer_ID);
  450. GDrawableType gimp_layer_type                      (gint32       layer_ID);
  451. void          gimp_layer_add_alpha                 (gint32        layer_ID);
  452. gint32        gimp_layer_create_mask               (gint32        layer_ID,
  453.                             gint          mask_type);
  454. void          gimp_layer_resize                    (gint32        layer_ID,
  455.                             guint         new_width,
  456.                             guint         new_height,
  457.                             gint          offset_x,
  458.                             gint          offset_y);
  459. void          gimp_layer_scale                     (gint32        layer_ID,
  460.                             guint         new_width,
  461.                             guint         new_height,
  462.                             gint          local_origin);
  463. void          gimp_layer_translate                 (gint32        layer_ID,
  464.                             gint          offset_x,
  465.                             gint          offset_y);
  466. gint          gimp_layer_is_floating_selection     (gint32        layer_ID);
  467. gint32        gimp_layer_get_image_id              (gint32        layer_ID);
  468. gint32        gimp_layer_get_mask_id               (gint32        layer_ID);
  469. gint          gimp_layer_get_apply_mask            (gint32        layer_ID);
  470. gint          gimp_layer_get_edit_mask             (gint32        layer_ID);
  471. GLayerMode    gimp_layer_get_mode                  (gint32        layer_ID);
  472. char*         gimp_layer_get_name                  (gint32        layer_ID);
  473. gdouble       gimp_layer_get_opacity               (gint32        layer_ID);
  474. gint          gimp_layer_get_preserve_transparency (gint32        layer_ID);
  475. gint          gimp_layer_get_show_mask             (gint32        layer_ID);
  476. gint          gimp_layer_get_visible               (gint32        layer_ID);
  477. void          gimp_layer_set_apply_mask            (gint32        layer_ID,
  478.                             gint          apply_mask);
  479. void          gimp_layer_set_edit_mask             (gint32        layer_ID,
  480.                             gint          edit_mask);
  481. void          gimp_layer_set_mode                  (gint32        layer_ID,
  482.                             GLayerMode    mode);
  483. void          gimp_layer_set_name                  (gint32        layer_ID,
  484.                             char         *name);
  485. void          gimp_layer_set_offsets               (gint32        layer_ID,
  486.                             gint          offset_x,
  487.                             gint          offset_y);
  488. void          gimp_layer_set_opacity               (gint32        layer_ID,
  489.                             gdouble       opacity);
  490. void          gimp_layer_set_preserve_transparency (gint32        layer_ID,
  491.                             gint          preserve_transparency);
  492. void          gimp_layer_set_show_mask             (gint32        layer_ID,
  493.                             gint          show_mask);
  494. void          gimp_layer_set_visible               (gint32        layer_ID,
  495.                             gint          visible);
  496.  
  497.  
  498. /****************************************
  499.  *             Channels                 *
  500.  ****************************************/
  501.  
  502. gint32  gimp_channel_new             (gint32   image_ID,
  503.                       char    *name,
  504.                       guint    width,
  505.                       guint    height,
  506.                       gdouble  opacity,
  507.                       guchar  *color);
  508. gint32  gimp_channel_copy            (gint32   channel_ID);
  509. void    gimp_channel_delete          (gint32   channel_ID);
  510. guint   gimp_channel_width           (gint32   channel_ID);
  511. guint   gimp_channel_height          (gint32   channel_ID);
  512. gint32  gimp_channel_get_image_id    (gint32   channel_ID);
  513. gint32  gimp_channel_get_layer_id    (gint32   channel_ID);
  514. void    gimp_channel_get_color       (gint32   channel_ID,
  515.                       guchar  *red,
  516.                       guchar  *green,
  517.                       guchar  *blue);
  518. char*   gimp_channel_get_name        (gint32   channel_ID);
  519. gdouble gimp_channel_get_opacity     (gint32   channel_ID);
  520. gint    gimp_channel_get_show_masked (gint32   channel_ID);
  521. gint    gimp_channel_get_visible     (gint32   channel_ID);
  522. void    gimp_channel_set_color       (gint32   channel_ID,
  523.                       guchar   red,
  524.                       guchar   green,
  525.                       guchar   blue);
  526. void    gimp_channel_set_name        (gint32   channel_ID,
  527.                       char    *name);
  528. void    gimp_channel_set_opacity     (gint32   channel_ID,
  529.                       gdouble  opacity);
  530. void    gimp_channel_set_show_masked (gint32   channel_ID,
  531.                       gint     show_masked);
  532. void    gimp_channel_set_visible     (gint32   channel_ID,
  533.                       gint     visible);
  534.  
  535.  
  536. /****************************************
  537.  *             GDrawables                *
  538.  ****************************************/
  539.  
  540. GDrawable*    gimp_drawable_get          (gint32     drawable_ID);
  541. void          gimp_drawable_detach       (GDrawable *drawable);
  542. void          gimp_drawable_flush        (GDrawable *drawable);
  543. void          gimp_drawable_delete       (GDrawable *drawable);
  544. void          gimp_drawable_update       (gint32     drawable_ID,
  545.                       gint       x,
  546.                       gint       y,
  547.                       guint      width,
  548.                       guint      height);
  549. void          gimp_drawable_merge_shadow (gint32     drawable_ID,
  550.                       gint       undoable);
  551. gint32        gimp_drawable_image_id     (gint32     drawable_ID);
  552. char*         gimp_drawable_name         (gint32     drawable_ID);
  553. guint         gimp_drawable_width        (gint32     drawable_ID);
  554. guint         gimp_drawable_height       (gint32     drawable_ID);
  555. guint         gimp_drawable_bpp          (gint32     drawable_ID);
  556. GDrawableType gimp_drawable_type         (gint32     drawable_ID);
  557. gint          gimp_drawable_visible      (gint32     drawable_ID);
  558. gint          gimp_drawable_channel      (gint32     drawable_ID);
  559. gint          gimp_drawable_color        (gint32     drawable_ID);
  560. gint          gimp_drawable_gray         (gint32     drawable_ID);
  561. gint          gimp_drawable_has_alpha    (gint32     drawable_ID);
  562. gint          gimp_drawable_indexed      (gint32     drawable_ID);
  563. gint          gimp_drawable_layer        (gint32     drawable_ID);
  564. gint          gimp_drawable_layer_mask   (gint32     drawable_ID);
  565. gint          gimp_drawable_mask_bounds  (gint32     drawable_ID,
  566.                       gint      *x1,
  567.                       gint      *y1,
  568.                       gint      *x2,
  569.                       gint      *y2);
  570. void          gimp_drawable_offsets      (gint32     drawable_ID,
  571.                       gint      *offset_x,
  572.                       gint      *offset_y);
  573. void          gimp_drawable_fill         (gint32     drawable_ID,
  574.                       gint       fill_type);
  575. void          gimp_drawable_set_name     (gint32     drawable_ID,
  576.                       char      *name);
  577. void          gimp_drawable_set_visible  (gint32     drawable_ID,
  578.                       gint       visible);
  579. GTile*        gimp_drawable_get_tile     (GDrawable *drawable,
  580.                       gint       shadow,
  581.                       gint       row,
  582.                       gint       col);
  583. GTile*        gimp_drawable_get_tile2    (GDrawable *drawable,
  584.                       gint       shadow,
  585.                       gint       x,
  586.                       gint       y);
  587.  
  588.  
  589. /****************************************
  590.  *               GTiles                  *
  591.  ****************************************/
  592.  
  593. void  gimp_tile_ref          (GTile   *tile);
  594. void  gimp_tile_ref_zero     (GTile   *tile);
  595. void  gimp_tile_unref        (GTile   *tile,
  596.                   int     dirty);
  597. void  gimp_tile_flush        (GTile   *tile);
  598. void  gimp_tile_cache_size   (gulong  kilobytes);
  599. void  gimp_tile_cache_ntiles (gulong  ntiles);
  600. guint gimp_tile_width        (void);
  601. guint gimp_tile_height       (void);
  602.  
  603.  
  604. /****************************************
  605.  *           Pixel Regions              *
  606.  ****************************************/
  607.  
  608. void     gimp_pixel_rgn_init      (GPixelRgn *pr,
  609.                    GDrawable *drawable,
  610.                    int        x,
  611.                    int        y,
  612.                    int        width,
  613.                    int        height,
  614.                    int        dirty,
  615.                    int        shadow);
  616. void     gimp_pixel_rgn_resize    (GPixelRgn *pr,
  617.                    int        x,
  618.                    int        y,
  619.                    int        width,
  620.                    int        height);
  621. void     gimp_pixel_rgn_get_pixel (GPixelRgn *pr,
  622.                    guchar    *buf,
  623.                    int        x,
  624.                    int        y);
  625. void     gimp_pixel_rgn_get_row   (GPixelRgn *pr,
  626.                    guchar    *buf,
  627.                    int        x,
  628.                    int        y,
  629.                    int        width);
  630. void     gimp_pixel_rgn_get_col   (GPixelRgn *pr,
  631.                    guchar    *buf,
  632.                    int        x,
  633.                    int        y,
  634.                    int        height);
  635. void     gimp_pixel_rgn_get_rect  (GPixelRgn *pr,
  636.                    guchar    *buf,
  637.                    int        x,
  638.                    int        y,
  639.                    int        width,
  640.                    int        height);
  641. void     gimp_pixel_rgn_set_pixel (GPixelRgn *pr,
  642.                    guchar    *buf,
  643.                    int        x,
  644.                    int        y);
  645. void     gimp_pixel_rgn_set_row   (GPixelRgn *pr,
  646.                    guchar    *buf,
  647.                    int        x,
  648.                    int        y,
  649.                    int        width);
  650. void     gimp_pixel_rgn_set_col   (GPixelRgn *pr,
  651.                    guchar    *buf,
  652.                    int        x,
  653.                    int        y,
  654.                    int        height);
  655. void     gimp_pixel_rgn_set_rect  (GPixelRgn *pr,
  656.                    guchar    *buf,
  657.                    int        x,
  658.                    int        y,
  659.                    int        width,
  660.                    int        height);
  661. gpointer gimp_pixel_rgns_register (int        nrgns,
  662.                    ...);
  663. gpointer gimp_pixel_rgns_process  (gpointer   pri_ptr);
  664.  
  665.  
  666. /****************************************
  667.  *            The Palette               *
  668.  ****************************************/
  669.  
  670. void gimp_palette_get_background (guchar *red,
  671.                   guchar *green,
  672.                   guchar *blue);
  673. void gimp_palette_get_foreground (guchar *red,
  674.                   guchar *green,
  675.                   guchar *blue);
  676. void gimp_palette_set_background (guchar  red,
  677.                   guchar  green,
  678.                   guchar  blue);
  679. void gimp_palette_set_foreground (guchar  red,
  680.                   guchar  green,
  681.                   guchar  blue);
  682.  
  683. /****************************************
  684.  *            Gradients                 *
  685.  ****************************************/
  686.  
  687. char**   gimp_gradients_get_list       (gint    *num_gradients);
  688. char*    gimp_gradients_get_active     (void);
  689. void     gimp_gradients_set_active     (char    *name);
  690. gdouble* gimp_gradients_sample_uniform (gint     num_samples);
  691. gdouble* gimp_gradients_sample_custom  (gint     num_samples,
  692.                     gdouble *positions);
  693.  
  694.  
  695. #ifdef __cplusplus
  696. }
  697. #endif /* __cplusplus */
  698.  
  699.  
  700. #endif /* __GIMP_H__ */
  701.